<?php
namespace app\controllers;

use Yii;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\web\Response;
use app\services\SolutionService;


class SolutionAuditController extends AuthController
{
    public $currentHeader = 'header-operation';
    public $currentNav = 'solution-audit-nav';
    public $pageTitle = '';

    public function init() {
        parent::init();
        $this->service = new SolutionService();
    }

    public function actionAuditList() {
        $this->pageTitle = $this->t('solution', 'Solution Audit');
        return $this->show();
    }

    public function actionGetSolutionAuditList() {
        $serv = new SolutionService();
        $solutions = $this->service->getAllSolutionAuditList();
        $this->jsonReturn(['data' => $solutions]);
    }

    public function actionAuditSolution() {
        $this->service->auditSolution();
    }
}// end of advertiser controller declaration
